<?php
require_once(dirname(__FILE__) . '/lib/Doctrine.php');


spl_autoload_register(array('Doctrine', 'autoload'));
spl_autoload_register(array('Doctrine_Core', 'modelsAutoload'));

$manager = Doctrine_Manager::getInstance();

$user = 'u109649370_root';
$password = 'marcelpaulaherminia';
$host = 'mysql.hostinger.com.br';
$dbname = 'u109649370_database';
$driver = 'mysql';


$manager = Doctrine_Manager::getInstance();

	try {
	  // Insira aqui os dados de sua conexão
	  $conn = Doctrine_Manager::connection($driver.'://'.$user.':'.$password.'@'.$host.'/'.$dbname);
	$conn->setOption('username', $user);
	$conn->setOption('password', $password);

	  $manager->setAttribute(Doctrine_Core::ATTR_MODEL_LOADING,
	Doctrine_Core::MODEL_LOADING_CONSERVATIVE);
	  $manager->setAttribute(Doctrine_Core::ATTR_EXPORT, Doctrine_Core::EXPORT_ALL);

	  $profiler = new Doctrine_Connection_Profiler();
	  $manager->setListener($profiler);

	} catch (Doctrine_Manager_Exception $e) {
	  print $e->getMessage();
	}



Doctrine_Core::loadModels('models');



